package com.intelligentcar.springboot.service.serverImpl;

import com.intelligentcar.springboot.bean.Linelist;
import com.intelligentcar.springboot.bean.Scheduling;
import com.intelligentcar.springboot.bean.Station;
import com.intelligentcar.springboot.bean.Vehicle;
import com.intelligentcar.springboot.mapper.StationMapper;
import com.intelligentcar.springboot.service.StationServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Service
public class StationServerImpl implements StationServer {

    @Autowired
    private StationMapper stationMapper;

    @Override
    public int insertStation(Station station) {
        return stationMapper.insertStation(station);
    }

    @Override
    public List<Station> selectStation() {
        return stationMapper.selectStation();
    }

    @Override
    public List<Linelist> selectLine() {
        return stationMapper.selectLine();
    }

    @Override
    public int insertLine(Linelist linelist) {
        return stationMapper.insertLine(linelist);
    }

    @Override
    public int deleteStation(String id) {
        return stationMapper.deleteStation(id);
    }

    @Override
    public int updateStation(String stationName, Long id) {
        return stationMapper.updateStation(stationName,id);
    }


    @Override
    public int deleteLine(String lineState, Long luid) {
        return stationMapper.deleteLine( lineState, luid);
    }

    @Override
    public List<Linelist> selectLineId() {
        return stationMapper.selectLineId();
    }

    @Override
    public List<Vehicle> selectVehicleId() {
        return stationMapper.selectVehicleId();
    }

    @Override
    public List<Station> selectStationId() {
        return stationMapper.selectStationId();
    }

    //查询站点表种的所有站点
    @Override
    public List<Station> selectstation() {
        return stationMapper.selectstation();
    }

    @Override
    public int deleteStation(String id,String stationName) {
        return stationMapper.deleteStation(id,stationName);
    }

    @Override
    public List<Linelist> selectLineList() {
        return stationMapper.selectLineList();
    }

    @Override
    public List<Linelist> selectOneLineList(String lineId) {
        return stationMapper.selectOneLineList(lineId);
    }

    @Override
    public int deleteOneLineList(String lineId) {
        return stationMapper.deleteOneLineList(lineId);
    }

    @Override
    public int updateLine( String insertBeginLineName, String insertEndLineName,String lineId) {
        return stationMapper.updateLine(insertBeginLineName, insertEndLineName,lineId);
    }

    @Override
    public int selectCountStation(String rid) {
        return stationMapper.selectCountStation(rid);
    }

    @Override
    public int updateStation(String stationName,String selectLngLat, Long id) {
        return stationMapper.updateStation(stationName,selectLngLat,id);
    }

    @Override
    public List<Station> selectStationName() {
        return stationMapper.selectStationName();
    }

    @Override
    public List<Station> selectStation2(String stationName, Long id) {
        return stationMapper.selectStation2(stationName, id);
    }



}
